import { useCookies } from '@vueuse/integrations/useCookies'

const TOKEN_KEY = 'admin-token'
const cookie = useCookies()

export function getToken() {
  return cookie.get(TOKEN_KEY)
}

export function setToken(token: string) {
  return cookie.set(TOKEN_KEY, token)
}

export function removeToken() {
  return cookie.remove(TOKEN_KEY)
}
